import request from "./request";

export const wxAuth = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/login/wechat", params,{token});
};

//check user
export const getUserDetail = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/queryById", params,{token});
};

export const loginOut = () => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/out", null,{token});
};


//IM相关

export const addFriendByServer = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/im/addFriend", params,{token});
};





export const getCityMsg = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/chinaCityGeo/locate", params,{token});
};


export const creatGroup = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/create", params,{token});
};

export const destroyGroup = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/destroy", params,{token});
};


//短信类型(1.登录 2.绑定 3.找回密码)
// private String messageType;
//手机号
// private String phone;

export const getVerCode = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/sendMessage", params,{token});
};

// String phone;

// String authCode;

export const codeLogin = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/login/phoneCode", params,{token});
};

// String phone;

// String password;
export const pwdLogin = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/login/account", params,{token});
};

export const checkCode = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/checkSms", params,{token});
};


export const resetPassword = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/resetPassword", params,{token});
};


export const bindPhoneByCode = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/bindPhone", params,{token});
};

export const mergeAccount = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/mergeAccount", params,{token});
};


//getSelectConfig
export const getSelectConfig = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/slimStaticConfig/queryListByTypes", params,{token});
};


export const createCircle = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/create", params,{token});
};

export const getCircleListv1 = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/query", params,{token});
};
export const getCircleList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/queryV2", params,{token});
};

export const getCircleDetail = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/queryById", params,{token});
};


export const groupDestory = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/destroy", params,{token});
};

export const groupUpdate = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/update", params,{token});
};

export const groupUserUpdateRole = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUser/updateRole", params,{token});
};

export const getService = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userGroupItems/queryList", params,{token});
};


export const vistorJoin = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/addVisitor", params,{token});
};

export const vistorQuit = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/deleteVisitor", params,{token});
};

export const vistorToMember = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/visitorToMember", params,{token});
};



export const getPangyouList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/queryListByIndex", params,{token});
};


export const updateUserGps = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/updateUserGps", params,{token});
};


export const getUserDetail1 = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/queryDetailById", params,{token});
};

export const userUpdate = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/updateById", params,{token});
};

export const getUserQR = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/qrCode", params,{token});
};
export const getGroupQR = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/qrCode", params,{token});
};

export const verifyRealName = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/verifyRealName", params,{token});
};

export const groupIsFavorit = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavorites/isFavorites", params,{token});
};

export const addFav = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavorites/add", params,{token});
};

export const removeFav = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavorites/remove", params,{token});
};


export const queryUser = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/queryList", params,{token});
};


export const getGroupMember = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUser/query", params,{token});
};


export const getUserSecret = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userSecret/query", params,{token});
};

export const updateUserSecret = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userSecret/update", params,{token});
};




export const addServiceHistory = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userGroupItems/add", params,{token});
};


export const getGroupHistory = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupHistory/query", params,{token});
};

 // 撰写评论  
 export const userAppraiseAdd = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userAppraise/add", params,{token});
};
//查询用户评论 
export const userAppraise = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userAppraise/queryList", params,{token});
};

export const couldAppraise = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userAppraise/isEvaluable", params,{token});
};
//投诉 
export const userComplaint = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userComplaint/add", params,{token});
};



//预支付
export const advanceOrder = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/orderInfo/advanceOrder", params,{token});
};


//支付
export const makeOrder = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/orderInfo/pay", params,{token});
};

//查询支付状态
export const checkPayStatu = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/orderInfo/queryOrderStatus", params,{token});
};

//查询支付状态
export const getWallet = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userWallet/queryByUserId", params,{token});
};

//根据用户id查询交易记录
export const getTransaction = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userWallet/queryListByUserId", params,{token});
};

//根据用户消费明细
export const getConsumption = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/orderInfo/queryList", params,{token});
};
//查询用户结算卡
export const getUserSettleAccount = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userSettleAccount/queryPayTypeList", params,{token});
};
//添加提现账户
export const addSettleAccount = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userSettleAccount/add", params,{token});
};
//修改提现账户
export const editSettleAccount = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userSettleAccount/updateById", params,{token});
};
//用户提现
export const addWithdraw = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userWallet/withdraw", params,{token});
};
//绑定微信
export const bindWechat = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/bindWechat", params,{token});
};
//添加健康记录
export const addHealthRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealth/add", params,{token});
};
//查询记录首页数据
export const healthRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealth/index", params,{token});
};
//获取运动列表
export const getSportsList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/sports/queryList", params,{token});
};
//获取运动收藏列表
export const getFavoritesSports = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavoritesSports/queryList", params,{token});
};
//运动收藏
export const editSportsCollect = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavoritesSports/opt", params,{token});
};
//修改/添加运动
export const addOrUpdateSports = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userSportsRecord/addOrUpdate", params,{token});
};
//查询用户运动记录
export const userSportsRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userSportsRecord/queryByUserIdAndRecordDate", params,{token});
};
//查询用户有运动的日期
export const getSportsDate = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userSportsRecord/queryMonthCount", params,{token});
};
//获取食物列表
export const getFoodList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/foodAll/queryList", params,{token});
};
//获取食物详情
export const getFoodDetail = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/foodAll/queryByCode", params,{token});
};
//模糊查询食物
export const searchFood = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/foodAll/queryByName", params,{token});
};
//获取用户健康信息
export const getUserHealth = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealth/queryByUserId", params,{token});
};
//体重记录查询
export const getUserWeightRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userWeightRecord/queryList", params,{token});
};
//添加体重记录
export const addUserWeightRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userWeightRecord/add", params,{token});
};
//查询有体重记录的日期
export const getWeightDate = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userWeightRecord/queryMonthCount", params,{token});
};
//删除体重记录
export const delWeightRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userWeightRecord/del", params,{token});
};
//食物收藏
export const editFoodCollect = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavoritesFood/opt", params,{token});
};
//获取食物收藏列表
export const getFavoritesFood = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavoritesFood/queryList", params,{token});
};
//获取单个食物是否收藏
export const foodIsCollect = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavoritesFood/isFavorites", params,{token});
};
//添加饮食记录
export const addFoodRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealthRecordDetail/addFood", params,{token});
};
//查询用户饮食记录
export const getFoodRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealthRecordDetail/queryByUserIdAndRecordDate", params,{token});
};
//查询有饮食记录的日期
export const getFoodDate = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealthRecordDetail/queryMonthCount", params,{token});
};
//查询历史热量和体重
export const getHeatWeightRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealthRecord/queryHealthListByUserId", params,{token});
};
//查询有历史饮食记录
export const getFoodRecordList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealthRecord/queryListByUserId", params,{token});
};
//查询当日饮食记录
export const getIsFoodRecordList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealthRecord/queryByUserIdAndRecordDate", params,{token});
};
//编辑健康记录
export const editUserHealth = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealth/updateByUserId", params,{token});
};
//添加喝水记录
export const addWaterRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealthRecordDetail/addWater", params,{token});
};
//删除喝水记录
export const delWaterRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealthRecordDetail/del", params,{token});
};
//群下用户打卡统计
export const getClockinCount = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserHealthRecord/queryCount", params,{token});
};
//设置打卡成员
export const setupClockUser = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUser/setupClock", params,{token});
};
//群下用户打卡概览
export const queryClockDetail = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUser/queryClockDetail", params,{token});
};
//群下用户打卡概览
export const getGroupFoodRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserHealthRecordDetail/queryByUserIdAndRecordDate", params,{token});
};
//查询有饮食记录的日期
export const getGroupFoodDate = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserHealthRecordDetail/queryMonthCount", params,{token});
};
//群饮食记录添加
export const addGroupFoodRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserHealthRecordDetail/addFood", params,{token});
};
//群运动记录添加
export const addOrUpdateGroupSports = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserSportsRecord/addOrUpdate", params,{token});
};
//查询用户有群运动的日期
export const getGroupSportsDate = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserSportsRecord/queryMonthCount", params,{token});
};
//用户喝水打卡
export const addGroupWaterRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserHealthRecordDetail/addWater", params,{token});
};
//用户喝水打卡
export const addGroupWeightRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserWeightRecord/add", params,{token});
};
//用户喝水打卡
export const getGroupUserHealthRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserHealthRecord/queryUserClockList", params,{token});
};
//用户体重打卡记录
export const getGroupUserWeightRecord = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserWeightRecord/queryList", params,{token});
};
//查询有体重打卡的日期
export const getGroupWeightDate = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserWeightRecord/queryMonthCount", params,{token});
};
//查询实时身体信息
export const getBodyInfo = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealth/bodyInfo", params,{token});
};

export const checkUpdate = (params:any) => {
    // return new Promise((resolve, reject) => {
    //      resolve({
    //         version: '1.0.1',
    //         note:'1.更新了xxxxxxxxx',
    //         type:'hot',
    //         notice:true,
    //         url:'http://192.168.31.218:3456/101.wgt'
    //      })
    // })
    const token = uni.getStorageSync('api_token');
    return request.post("/clientVersion/init", params,{token});
};

//朋友群动态
export const releaseTrend = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/add", params,{token});
};

//根据userId 查询朋友群
export const getUserTrends = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/queryListByUserId", params,{token});
};

//朋友群点赞
export const likeTrend = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/like", params,{token});
};
//取消朋友圈点赞
export const unlikeTrend = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/unLike", params,{token});
};


//获取评论
export const getTrendComment = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/queryCommentList", params,{token});
};

//取消朋友圈点赞
export const getTrendDetail = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/queryDetailByFcmid", params,{token});
};

//发表评论
export const addTrendComent = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/addComment", params,{token});
};

//删除评论
export const delTrendComent = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/removeComment", params,{token});
};


//更新朋友圈状态
export const updateTrend = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/update", params,{token});
};

//删除朋友圈
export const delTrend = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/remove", params,{token});
};

//添加方案
export const addUserPlan = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userPlan/add", params,{token});
};


//首页朋友圈
export const getHomeTrend = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/friendCircle/queryNearList", params,{token});
};
//查询用户方案列表
export const getUserPlanList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userPlan/queryList", params,{token});
};
//查询用户方案详情
export const getUserPlanDetail = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userPlan/queryDetail", params,{token});
};
//编辑方案
export const updateUserPlan = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userPlan/update", params,{token});
};
//删除方案
export const delUserPlan = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userPlan/remove", params,{token});
};
//使用方案
export const useUserPlan = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userPlan/use", params,{token});
};


export const beforeKickOut = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/exitAfter", params,{token});
};

export const groupKickOut = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUser/deleteMember", params,{token});
};

export const getGroupBlackList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserBlacklist/queryList", params,{token});
};

export const isInGroupBlacklist = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserBlacklist/isBlacklist", params,{token});
};


export const removeGroupBlacklist = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserBlacklist/remove", params,{token});
};
//群打卡记录
export const getGroupUserHealthRecordType = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUserHealthRecord/queryListByType", params,{token});
};
//方案广场查询
export const getPublicPlanList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userPlan/queryPublicList", params,{token});
};


export const getProgrammeCollect = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavoritesPlan/queryList", params,{token});
};


export const getCircleCollect = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavorites/queryList", params,{token});
};


export const getRankList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUser/queryClockList", params,{token});
};

export const getArticleList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/article/queryList", params,{token});
};

export const getArticleDetail = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/article/queryDetailById", params,{token});
};


//群打卡记录
export const geUserHealthRecordType = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userHealthRecord/queryListByType", params,{token});
};


//获取群方案
export const getGroupPlan = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupPlan/queryList", params,{token});
};

//获取群方案
export const editGroupPlan = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupPlan/opt", params,{token});
};

//获取群方案
export const relayPlan = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userPlan/relay", params,{token});
};

//获取群方案
export const checkApplePayResult = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/applePay/iosPay", params,{token});
};
//获取食物排行
export const getFoodRank = () => {
    const token = uni.getStorageSync('api_token');
    return request.post("/foodRank/queryList", {},{token});
};



export const checkV = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/slimStaticConfig/queryClientVersionList", params,{token});
};

export const getSign = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/im/getSign", params,{token});
};


export const logoff = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/logout", params,{token});
};

export const getGroupOverview = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUser/queryOverview", params,{token});
};


export const webali = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/pay/wapPayStr", params,{token});
};


export const pinbilahei = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userBlacklist/add", params,{token});
};


export const removelahei = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userBlacklist/remove", params,{token});
};


export const getGroupUserLevel = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUser/queryLevel", params,{token});
};


export const checkGroupUserCount = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/queryRealUserCountById", params,{token});
};


export const checkCreatedGroup = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/queryRealGroupCount", params,{token});
};
export const queryUserToGroup = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/groupUser/queryUserToGroup", params,{token});
};
export const setPayPwd = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/user/updateUserPayPwd", params,{token});
};
//发红包
export const sendGroup = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/red/sendGroup", params,{token});
};
//抢红包
export const robRed = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/red/rob", params,{token});
};
//红包详情
export const queryRedByCode = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/red/queryRedByCode", params,{token});
};
//群转账
export const sendGroupTransfer = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/transfer/sendGroup", params,{token});
};
//转账详情
export const getTransferDetails = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/transfer/queryTransferByCode", params,{token});
};
//接收转账
export const receiveTransfer = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/transfer/rob", params,{token});
};
//发送个人红包
export const sendUserRed = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/red/sendUser", params,{token});
};
//个人转账
export const sendUserTransfer = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/transfer/sendUser", params,{token});
};
//禁言事件通知
export const sendBannedMessage = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/im/sendBannedMessage", params,{token});
};
//添加表情
export const addUserExpression = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userExpression/add", params,{token});
};
//查询表情
export const getUserExpression = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userExpression/queryList", params,{token});
};
//查询表情
export const delUserExpression = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userExpression/del", params,{token});
};
//表情移动到最前
export const topUserExpression = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userExpression/top", params,{token});
};
//群主或者管理员拉人
export const groupAddMember = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/group/addMember", params,{token});
};
//添加用户收藏
export const addUserFavorites = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavorites/add", params,{token});
};
//根据userId 查询收藏
export const getUserFavorites = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavorites/queryList", params,{token});
};
//删除收藏
export const delUserFavorites = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/userFavorites/remove", params,{token});
};
//发送群消息
export const sendGroupMessage = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/im/sendGroup", params,{token});
};
//发送用户消息
export const sendUserMessage = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/im/sendUser", params,{token});
};
//获取获取交易设置
export const getTradeConfig = () => {
    const token = uni.getStorageSync('api_token');
    return request.post("/tradeConfig/queryOne", {},{token});
};
//批量发送群消息
export const sendGroupMessageList = (params:any) => {
    const token = uni.getStorageSync('api_token');
    return request.post("/im/sendGroupList", params,{token});
};
